package io.renren.modules.lucky.service;

import com.baomidou.mybatisplus.extension.service.IService;
import io.renren.common.utils.PageUtils;
import io.renren.modules.lucky.entity.AppCommentLikeEntity;

import java.util.Map;

/**
 * app端-商品评论-点赞信息表
 *
 * @author hobcoat
 * @email sunlightcs@gmail.com
 * @date 2019-11-20 10:30:38
 */
public interface AppCommentLikeService extends IService<AppCommentLikeEntity> {

    PageUtils queryPage(Map<String, Object> params);
    /**
     * 点赞 or 去掉点赞
     * @param userToken
     * @param commentId
     * @param flag
     * @param userId
     * @author HObOCat
     * @return
     */
    int addOrRemoveCommentLike(String userToken, String userId, String commentId, String flag);
    /**
     * 获取点赞总数
     * @param commentId 评论Id
     * @author HObOCat
     * @return
     */
    int getLikeSum(String commentId);
}

